package com.ruoyi.production.service.impl.regulator;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.production.domain.regulator.RegulatorApplyTemporary;
import com.ruoyi.production.mapper.regulator.RegulatorApplyTemporaryMapper;
import com.ruoyi.production.service.regulator.IRegulatorApplyTemporaryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 调节剂临时申请Service业务层处理
 *
 * @author ruoyi
 * @date 2021-07-11
 */
@Service
public class RegulatorApplyTemporaryServiceImpl implements IRegulatorApplyTemporaryService
{
    @Autowired
    private RegulatorApplyTemporaryMapper regulatorApplyTemporaryMapper;

    /**
     * 查询调节剂临时申请
     *
     * @param regulatorApplyTemporaryId 调节剂临时申请ID
     * @return 调节剂临时申请
     */
    @Override
    public RegulatorApplyTemporary selectRegulatorApplyTemporaryById(Long regulatorApplyTemporaryId)
    {
        return regulatorApplyTemporaryMapper.selectRegulatorApplyTemporaryById(regulatorApplyTemporaryId);
    }

    /**
     * 查询调节剂临时申请列表
     *
     * @param regulatorApplyTemporary 调节剂临时申请
     * @return 调节剂临时申请
     */
    @Override
    public List<RegulatorApplyTemporary> selectRegulatorApplyTemporaryList(RegulatorApplyTemporary regulatorApplyTemporary)
    {
        return regulatorApplyTemporaryMapper.selectRegulatorApplyTemporaryList(regulatorApplyTemporary);
    }

    /**
     * 新增调节剂临时申请
     *
     * @param regulatorApplyTemporary 调节剂临时申请
     * @return 结果
     */
    @Override
    public int insertRegulatorApplyTemporary(RegulatorApplyTemporary regulatorApplyTemporary)
    {












        regulatorApplyTemporary.setCreateTime(DateUtils.getNowDate());



        return regulatorApplyTemporaryMapper.insertRegulatorApplyTemporary(regulatorApplyTemporary);
    }

    /**
     * 修改调节剂临时申请
     *
     * @param regulatorApplyTemporary 调节剂临时申请
     * @return 结果
     */
    @Override
    public int updateRegulatorApplyTemporary(RegulatorApplyTemporary regulatorApplyTemporary)
    {
        regulatorApplyTemporary.setUpdateTime(DateUtils.getNowDate());
        return regulatorApplyTemporaryMapper.updateRegulatorApplyTemporary(regulatorApplyTemporary);
    }

    /**
     * 批量删除调节剂临时申请
     *
     * @param regulatorApplyTemporaryIds 需要删除的调节剂临时申请ID
     * @return 结果
     */
    @Override
    public int deleteRegulatorApplyTemporaryByIds(Long[] regulatorApplyTemporaryIds)
    {
        return regulatorApplyTemporaryMapper.deleteRegulatorApplyTemporaryByIds(regulatorApplyTemporaryIds);
    }

    /**
     * 删除调节剂临时申请信息
     *
     * @param regulatorApplyTemporaryId 调节剂临时申请ID
     * @return 结果
     */
    @Override
    public int deleteRegulatorApplyTemporaryById(Long regulatorApplyTemporaryId)
    {
        return regulatorApplyTemporaryMapper.deleteRegulatorApplyTemporaryById(regulatorApplyTemporaryId);
    }
}
